<template>
  <div class="container">
    <div>
      <Logo />
      <h1 class="title">Dog - {{server}}</h1>
    </div>
    <div class="dog">
      <h1>Dog</h1>
      <div>{{resInfo}}</div>
    </div>
  </div>
</template>

<script>
// import {signStr} from "@/utils/encryptionString"
// const {signStr} = require("./../utils/encryptionString")
import {signStr} from "./../utils/encryptionString"
export default {
  data(){
    return{
      server:process.server,
      // keywords: this.resInfo.code + ':' + this.resInfo.status
    }
  },
  head() {
    return {
      title: this.resInfo.requestId,
      meta: [
        // hid is used as unique identifier. Do not use `vmid` for it as it will not work
        { hid: 'keywords', name: 'keywords', content: this.resInfo.code },
        { hid: 'description', name: 'description', content: this.resInfo.message }
      ]
    }
  },
  async asyncData ({ app }) {
    let oUrl = '/api/user/customer/get'
    let params = {email:'42524073@qq.com'}
    let reqParams = signStr(params, oUrl)
    reqParams.data = params
    return await app.$axios({
      url:oUrl,
      method: 'post',
      data: reqParams
    }).then(res=>{
      console.log('async asyncData Email', res.data)
      return {
        resInfo:res.data
      }
    })
  },
  created(){
    console.log(signStr)
  },
}
</script>

<style>
.container {
  margin: 0 auto;
  min-height: 100vh;
  /*display: flex;*/
  justify-content: center;
  align-items: center;
  text-align: center;
}

.title {
  font-family:
    'Quicksand',
    'Source Sans Pro',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  display: block;
  font-weight: 300;
  font-size: 100px;
  color: #35495e;
  letter-spacing: 1px;
}

.subtitle {
  font-weight: 300;
  font-size: 42px;
  color: #526488;
  word-spacing: 5px;
  padding-bottom: 15px;
}

.links {
  padding-top: 15px;
}
</style>
